﻿using dz.inner.jky.api.service;
using dz.u9.jky.schema.Common;
using dz.u9.jky.schema.Ship;
using dz.u9.jky.schema.SM;
using System;
using System.Collections.Generic;
using System.Web.Http;
using UFIDA.U9.ISV.SM;
using UFIDA.U9.SM.DealerSO;

namespace dz.inner.jky.api
{
    /// <summary>
    /// 标准出货
    /// </summary>
    public class DzShipJkyController : DzBaseController
    {
        private ShipService service = new ShipService();
        /// <summary>
        /// 新增并审核
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        [HttpPost]
        public U9CResult AddAndAudit(DzShip dto)
        {
            List<Action<CommonDoc>> action = new List<Action<CommonDoc>>() { service.SubmitAndAudit };

            return util.U9Invoke(service.Add, action, ToCommonDoc, dto);
        }

        [HttpPost]
        public U9CResult Add(DzShip dto)
        {
            return service.Add(dto);
        }

       

        

    }
}
